import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import {AuthProvider} from './src/context/AuthContext';
import LoginScreen from './src/screens/LoginScreen';
import RegisterScreen from './src/screens/RegisterScreen';
import HomeScreen from './src/screens/HomeScreen';
import {RootStackParamList} from './src/types/Navigation';
import ProfileScreen from './src/screens/ProfileScreen';
import SettingsScreen from './src/screens/SettingsScreen';

const Stack = createStackNavigator<RootStackParamList>();

const App: React.FC = () => {
  return (
    <AuthProvider>
      <NavigationContainer>
        <Stack.Navigator initialRouteName="Login">
          <Stack.Screen 
            name="Login" 
            component={LoginScreen}
            options={{headerShown: false}}
          />
          <Stack.Screen 
            name="Register" 
            component={RegisterScreen}
            options={{headerShown: false}}
          />
          <Stack.Screen 
            name="Home" 
            component={HomeScreen}
            options={{headerLeft: () => null}}
          />
          <Stack.Screen 
            name="Profile" 
            component={ProfileScreen}
            options={{headerShown: false}}
          />
          <Stack.Screen 
            name="Settings" 
            component={SettingsScreen}
            options={{headerShown: false}}
          />
        </Stack.Navigator>
      </NavigationContainer>
    </AuthProvider>
  );
};

export default App;